Path Planning Method and Apparatus

ABSTRACT

A path planning method and apparatus, to implement better path planning includes obtaining, based on a pass-through distance of each of a plurality of first areas and a representation value of an environment characteristic of each first area, a pass-through cost for passing through each first area; obtaining a start location and a target location; and performing path planning based on the pass-through cost for passing through each first area, to determine a pass-through path from the start location to the target location, where the pass-through path includes an area passed through from the start location to the target location.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of International Application No.PCT/CN2018/073114 filed on Jan. 18, 2018, which claims priority toChinese Patent Application 201710034754.2, filed on Jan. 18, 2017. Thedisclosures of the aforementioned applications are hereby incorporatedby reference in their entireties.

TECHNICAL FIELD

Embodiments of the present disclosure relate to the field of intelligentcontrol, and more specifically, to a path planning method and apparatus.

BACKGROUND

Path planning is an important branch in the field of intelligent controlresearches. Using a good path planning technology can reduce anoperating time of an intelligent execution apparatus (for example, arobot), improve task execution efficiency, and improve task executionquality.

A map may be used to implement path planning. The map includes locationinformation and obstacle information such that an intelligent executionapparatus can find, based on the map, a path that can bypass anobstacle.

However, only the location information and the obstacle information areconsidered in existing path planning, and other factors are notconsidered. Consequently, application of path planning is limited.

SUMMARY

Embodiments of the present disclosure provide a path planning method anddevice, to implement better path planning.

According to a first aspect, a path planning method is provided. Themethod includes obtaining, based on a pass-through distance of each of aplurality of first areas and a representation value of an environmentcharacteristic of each first area, a pass-through cost for passingthrough each first area, obtaining a start location and a targetlocation, and performing path planning based on the pass-through costfor passing through each first area, to determine a pass-through pathfrom the start location to the target location, where the pass-throughpath includes an area passed through from the start location to thetarget location.

Therefore, the pass-through cost for passing through each first area isobtained based on the pass-through distance of each of the plurality offirst areas and the representation value of the environmentcharacteristic of each first area, and path planning is performed basedon the pass-through cost. In this way, when path planning is performed,not only a pass-through distance of an area but also a representationvalue of an environment characteristic of the area can be considered, toimplement better path planning. Further, the pass-through distance andthe representation value are quantized into a pass-through cost suchthat when an intelligent execution apparatus performs path planning, apass-through path is obtained based on the pass-through cost, to reducean operating time of the intelligent execution apparatus, and improvetask execution efficiency.

Optionally, the pass-through path may be a path with a minimumpass-through cost.

Optionally, the method further includes generating an environment mapbased on the pass-through cost for passing through each first area,where the environment map includes the pass-through cost for passingthrough each first area, and is used to mark the representation value ofeach first area within a coverage area of the plurality of first areas,and the performing path planning based on the pass-through cost forpassing through each first area, to determine a pass-through path fromthe start location to the target location includes based on theenvironment map, determining the pass-through path based on thepass-through cost for passing through each area within the coverage areaof the plurality of areas.

Therefore, the pass-through cost in each first area is obtained based onthe pass-through distance of each of the plurality of first areas andthe representation value of the environment characteristic of each firstarea, and the environment map on which a pass-through cost of each areais marked is generated such that a better map can be obtained.

Optionally, the environment map may be a pass-through cost list or aglobal pass-through cost topology view.

Optionally, the obtaining, based on a pass-through distance of each of aplurality of first areas and a representation value of an environmentcharacteristic of each first area, a pass-through cost for passingthrough each first area includes determining, based on the pass-throughdistance of each first area, a first pass-through cost componentcorresponding to the pass-through distance of each first area,determining, based on the representation value of the environmentcharacteristic of each first area, a second pass-through cost componentcorresponding to the representation value of the environmentcharacteristic of each first area, and calculating, based on the firstpass-through cost component and the second pass-through cost componentof each first area, the pass-through cost for passing through each firstarea.

Therefore, for each task type, a pass-through cost of the task type ineach area is calculated. In this way, when path planning of a task typeis performed, a pass-through cost of each area for the task type can bedirectly obtained, to implement more optimized path planning.

Optionally, the method further includes obtaining at least one task typeto be executed when the pass-through path is passed through, theobtaining, based on the representation value of the environmentcharacteristic of each first area, a second pass-through cost componentcorresponding to the pass-through distance of each first area includesobtaining, based on a representation value of at least one type ofavailable environment characteristic of each of the at least one tasktype in each first area, a second pass-through cost componentcorresponding to each task type at each first area, the calculating,based on the first pass-through cost component and the secondpass-through cost component of each first area, the pass-through costfor passing through each first area includes calculating, based on thefirst pass-through cost component of each first area and the secondpass-through cost component corresponding to each task type in eachfirst area, a pass-through cost for passing through each first area wheneach task type is executed, and the performing path planning based onthe pass-through cost for passing through each first area includesdetermining, based on the pass-through cost for passing through eachfirst area when each task type is executed, the pass-through path usedfor executing each task type.

Optionally, the at least one task type includes a first task type, andthe obtaining the second pass-through cost component corresponding toeach task type in each first area includes determining, based on arepresentation value of at least one type of environment characteristicwhose representation value meets a predetermined condition and that isin an available environment characteristic of the first task type ineach first area, a second pass-through cost component corresponding tothe first task type in each first area.

Optionally, the first area is an area that meets the followingcondition, the representation value of an available environmentcharacteristic of the first task type in the first area meets anenvironment characteristic requirement of the first task type.

Optionally, the method further includes determining at least one secondarea, where the representation value of the available environmentcharacteristic of the first task type in the second area does not meetthe environment characteristic requirement of the first task type, andwhen path planning is performed, considering each of the at least onesecond area as an obstacle.

Optionally, the method further includes obtaining a plurality of tasktypes to be executed when the pass-through path is passed through, theobtaining, based on the representation value of the environmentcharacteristic of each first area, a second pass-through cost componentcorresponding to the representation value of the environmentcharacteristic of each first area includes obtaining, based on arepresentation value of at least one type of available environmentcharacteristic of each of the plurality of task types, a secondpass-through cost component corresponding to a whole of the plurality oftask types in each first area, the calculating, based on the firstpass-through cost component and the second pass-through cost componentof each first area, the pass-through cost for passing through each firstarea includes calculating, based on the first pass-through costcomponent of each first area and the second pass-through cost componentcorresponding to the whole of the plurality of task types in each firstarea, a pass-through cost corresponding to the whole of the plurality oftask types in each first area, and the performing path planning based onthe pass-through cost for passing through each first area includesdetermining, based on the pass-through cost corresponding to the wholeof the plurality of task types in each first area, the pass-through pathused for executing the plurality of task types.

Therefore, the plurality of task types may be considered as a whole, andthe pass-through cost of the whole of the plurality of task types ineach area is obtained. In this way, when path planning required forexecuting the plurality of task types is performed, a pass-through costof the whole of the plurality of task types in each area can be directlyobtained, to reduce a processing time of the intelligent executionapparatus, and improve processing efficiency.

Optionally, the obtaining a second pass-through cost componentcorresponding to a whole of the plurality of task types in each firstarea includes obtaining, based on a representation value of at least onetype of available environment characteristic of each of the plurality oftask types in each first area, a second pass-through cost componentcorresponding to each task type in each first area, and performingweighted processing on a plurality of second pass-through costcomponents corresponding to the plurality of task types in each firstarea, to obtain the second pass-through cost component corresponding tothe whole of the plurality of task types in the first area.

Optionally, the first area is an area that meets the followingcondition, the representation value of the available environmentcharacteristic of each of the plurality of task types in the first areameets an environment characteristic requirement of each task type.

Optionally, the method further includes determining at least one thirdarea, where a representation value of an environment characteristiccorresponding to at least one of the plurality of task types in thethird area does not meet a representation value requirement of the atleast one task type, and when path planning is performed, consideringeach of the at least one third area as an obstacle.

Optionally, the determining, based on the representation value of theenvironment characteristic of each first area, a second pass-throughcost component corresponding to the representation value of theenvironment characteristic of each first area includes determining,based on a representation value of an environment characteristic of eacharea and a correspondence between a representation value interval of anenvironment characteristic and a pass-through cost component, the secondpass-through cost component in each first area.

Optionally, the obtaining, based on a pass-through distance of each of aplurality of first areas and a representation value of an environmentcharacteristic of each first area, a pass-through cost for passingthrough each first area includes obtaining, in a statistical mannerbased on the pass-through distance of each first area and representationvalues that are of an environment characteristic of each first area andthat are obtained at a plurality of times, the pass-through cost forpassing through each first area, or obtaining, in real time based on thepass-through distance of each first area and a real-time representationvalue of an environment characteristic of each first area, thepass-through cost for passing through each first area, or obtaining,based on the pass-through distance of each first area and a predictedrepresentation value of an environment characteristic of each firstarea, the pass-through cost for passing through each first area.

Optionally, the obtaining, in a statistical manner based on thepass-through distance of each first area and representation values thatare of an environment characteristic of each first area and that areobtained at a plurality of times, the pass-through cost for passingthrough each first area includes, when a change rate of a representationvalue of an environment characteristic of each first area is less thanor equal to a first threshold, obtaining, in a statistical manner basedon the pass-through distance of each first area and the representationvalues that are of the environment characteristic of each first area andthat are obtained at a plurality of times, the pass-through cost forpassing through each first area.

Optionally, the obtaining, in real time based on the pass-throughdistance of each first area and a real-time representation value of anenvironment characteristic of each first area, the pass-through cost forpassing through each first area includes, when a change rate of arepresentation value of an environment characteristic of each first areais greater than a second threshold, obtaining, in real time based on thepass-through distance of each first area and the real-timerepresentation value of the environment characteristic of each firstarea, the pass-through cost for passing through each first area.

Optionally, the environment characteristic includes a visual signal, thedetermining, based on the representation value of the environmentcharacteristic of each first area, a second pass-through cost componentcorresponding to the representation value of the environmentcharacteristic of each first area includes obtaining, based on arepresentation value of a visual signal that passes through each firstarea and that is in each of the plurality of directions, a secondpass-through cost component corresponding to each direction at eachfirst area, and the calculating, based on the first pass-through costcomponent and the second pass-through cost component of each first area,the pass-through cost for passing through each first area includesdetermining, based on the first pass-through cost component of eachfirst area and the second pass-through cost component corresponding toeach direction in each first area, a pass-through cost for passingthrough each first area in each direction.

Optionally, the environment characteristic includes at least one of avisual signal, a sound signal, and a contact surface status.

Optionally, the environment characteristic includes a visual signal, anda representation value of the visual signal includes light intensityand/or a quantity of visible characteristics.

Optionally, the environment characteristic includes a sound signal, anda representation value of the sound signal includes strength of thesound signal.

Optionally, the environment characteristic includes a contact surfacestatus, and a representation value of the contact surface statusincludes an inclination degree, a height change rate, and/or a frictiondegree of a contact surface of the location.

According to a second aspect, a path planning apparatus is provided. Thepath planning apparatus may include a unit configured to perform themethod in the first aspect or any one of the optional implementations ofthe first aspect.

According to a third aspect, a path planning apparatus is provided. Thepath planning apparatus may include a memory and a processor. The memorymay store program code, the processor communicates with the memory usingan internal connection path, and the processor may invoke the programcode stored in the memory, to perform the method in the first aspect orany one of the optional implementations of the first aspect.

According to a fourth aspect, a storage medium is provided. The storagemedium may store program code, and a processor may invoke the programcode stored in the storage medium, to perform the method in the firstaspect or any one of the optional implementations of the first aspect.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a schematic diagram of a path planning system according to anembodiment of the present disclosure.

FIG. 2 is a schematic flowchart of a path planning method according toan embodiment of the present disclosure.

FIG. 3 is a schematic diagram of performing path planning based on apass-through cost according to an embodiment of the present disclosure.

FIG. 4 is a schematic diagram of performing path planning based on apass-through cost according to an embodiment of the present disclosure.

FIG. 5 is a schematic diagram of performing path planning based on apass-through cost according to an embodiment of the present disclosure.

FIG. 6 is a schematic diagram of performing path planning based on apass-through cost according to an embodiment of the present disclosure.

FIG. 7 is a schematic diagram of performing path planning based on apass-through cost according to an embodiment of the present disclosure.

FIG. 8 is a schematic flowchart of a map generation method according toan embodiment of the present disclosure.

FIG. 9 is a schematic flowchart of a path planning method according toan embodiment of the present disclosure.

FIG. 10 is a schematic block diagram of a path planning apparatusaccording to an embodiment of the present disclosure.

FIG. 11 is a schematic block diagram of a map generation deviceaccording to an embodiment of the present disclosure.

FIG. 12 is a schematic block diagram of a path planning apparatusaccording to an embodiment of the present disclosure.

FIG. 13 is a schematic block diagram of a processing device according toan embodiment of the present disclosure.

DESCRIPTION OF EMBODIMENTS

The following describes the technical solutions in the embodiments ofthe present disclosure with reference to the accompanying drawings inthe embodiments of the present disclosure.

FIG. 1 is a schematic diagram of a path planning system according to anembodiment of the present disclosure. As shown in FIG. 1, the system mayinclude an environment system 110 and an intelligent execution apparatus120.

The environment system 110 may generate an environment characteristic,and the environment characteristic may include at least one of a visualsignal, a sound signal, and a contact surface status. The environmentcharacteristic may further include another characteristic, which is notspecifically limited herein.

The intelligent execution apparatus 120 may perform path planning basedon a representation value of the environment characteristic generated bythe environment system 110.

In an embodiment, the intelligent execution apparatus 120 may generatean environment map based on the representation value of the environmentcharacteristic, and perform path planning based on the environment map.

Optionally, the system may further include an intelligent executionapparatus 130.

The intelligent execution apparatus 120 may further send the generatedenvironment map to the intelligent execution apparatus 130. Theintelligent execution apparatus 130 may perform path planning based onthe environment map sent by the intelligent execution apparatus 120.

It should be understood that the intelligent execution apparatusdescribed in this embodiment of the present disclosure may be amachining apparatus that automatically works, for example, may be arobot, a self-driving vehicle, or an unmanned aerial vehicle. Althoughthe intelligent execution apparatuses 120 and 130 shown in FIG. 1 arerobots, they are merely examples described for ease of understanding,and are not intended to limit the scope of the present disclosure.Similarly, an illustration manner of the environment system 110 shallnot constitute any limitation on the scope of the embodiments of thepresent disclosure.

When path planning is performed, a candidate area may be divided into aplurality of areas, and a pass-through cost for passing through an areais marked in all or some areas. If a pass-through cost is high, a costfor passing through the area is high, and a probability that the area isselected is small when path planning is performed.

Optionally, a pass-through cost may be a value, and unitless valuescorresponding to all areas may be obtained for all the areas based on asame criterion.

The following describes in detail how to obtain pass-through costs forpassing through a plurality of areas and generate an environment mapbased on the pass-through costs of the plurality of areas, and describeshow to perform path planning based on the pass-through costs of theplurality of areas.

FIG. 2 is a schematic flowchart of a path planning method 200 accordingto an embodiment of the present disclosure. The method 200 may beapplied to the system shown in FIG. 1. The method may be optionallyexecuted by the intelligent execution apparatus 120 shown in FIG. 1. Itshould be understood that the method 200 may be executed by anotherdevice. An intelligent execution apparatus is used merely as an examplefor description in this embodiment of the present disclosure.

As shown in FIG. 2, the method 200 includes the following content.

210. Obtain, based on a pass-through distance of each of a plurality offirst areas and a representation value of an environment characteristicof each first area, a pass-through cost for passing through each firstarea.

Optionally, the intelligent execution apparatus may directly detect arepresentation value of an environment characteristic of each area, ormay receive a representation value that is of an environmentcharacteristic and that is sent by another device, or may receive amanually-input representation value of an environment characteristic.

Optionally, when directly detecting the representation value of theenvironment characteristic of each area, the intelligent executionapparatus may traverse all areas, to obtain the representation value ofthe environment characteristic for calculating a pass-through cost.

Optionally, the area described in this embodiment of the presentdisclosure may be referred to as a node, and the area may be a squarestructure, or may be a rectangle, a hexagon, or any other shape.

Optionally, pass-through distances of all areas in a map may be thesame, or may be different.

Optionally, the pass-through distance of the first area is a lengthbetween any two points in the first area. For example, area division ina grid manner is used as an example, and a length between any two pointsmay be a side-length distance or a diagonal distance.

Optionally, the environment characteristic described in this embodimentof the present disclosure may include at least one of a visual signal, asound signal, and a contact surface status.

Optionally, a representation value of the visual signal includes lightintensity and/or a quantity of visible characteristics.

Optionally, the visual signal may be used for positioning, for example,for positioning using a visible characteristic. Therefore, if a quantityof visible characteristics is large, positioning is easier. Whenpositioning is performed, the light intensity may also affectpositioning, for example, when the light intensity meets a visualrequirement of an intelligent execution device, positioning is easier.

Optionally, the environment characteristic includes a sound signal, anda representation value of the sound signal includes strength of thesound signal.

Optionally, sound signals may be classified into noise and a beneficialsound signal, and the beneficial sound signal may include an ultrasonicsignal, and positioning may be performed using the signal.

For example, intensity of noise in each area may be recorded, and ifintensity of noise at a location is small or there is no noise, thelocation is more easily passed through.

For another example, when communication or positioning is performedusing a sound, if strength of a sound signal in an area is high, it isconsidered that the area is more easily passed through.

Optionally, a representation value of the contact surface statusincludes an inclination degree, a height change rate, and/or a frictiondegree of a contact surface of the location.

For example, it is assumed that the contact surface is a road surface,and a representation value of the road surface may be a pass-throughdifficulty degree or a bumpy degree, whether the road surface is muddy,a slippery status, or an inclination angle of the road surface.

The contact surface status may be manually obtained, or contact surfacestatuses at different locations may be identified through detectionperformed by a device.

For example, a score may be manually provided based on a road surfacestatus. For example, a road surface with water is scored 0 points, amuddy road surface is scored 10 points, a road surface with aninclination angle greater than 5 degrees is scored 0 points, a roadsurface with a slippery degree or bumpy degree exceeding a threshold isscored 10 points, and another case is scored 100 points. A pass-throughcost is determined based on a score, for example, a higher scoreindicates a lower pass-through cost.

For example, a material of the road surface may be estimated using avisual identification method. If there is a visually identifiableobject, such as a wire, a threshold, or a stairway, a representationvalue may be obtained by quantizing the object. The slippery degree maybe estimated using a plurality of positioning manners and a method ofrobot odometry information comparison. The pass-through difficultydegree of a corresponding road segment may be estimated by recording anoutput power of a motor. The inclination angle of the road surface maybe obtained through calculation using a sensor such as a gravity meteror a camera built in a robot.

It should be understood that the first area described in this embodimentof the present disclosure may be any area in the candidate area, or maybe an area that meets a specific condition, for example, an area whoserepresentation value of an environment characteristic meets a specificcondition, and a pass-through cost may be calculated for the area.However, an area that does not meet a condition may be directlyconsidered as an obstacle.

It should be understood that in this embodiment of the presentdisclosure, the pass-through cost for passing through the first areasometimes may be referred to as a pass-through cost of the first area ora pass-through cost in the first area.

Optionally, in this embodiment of the present disclosure, theintelligent execution apparatus may generate an environment map based onthe pass-through cost for passing through each first area, where theenvironment map includes the pass-through cost for passing through eachfirst area, and is used to mark the representation value of each firstarea within a coverage area of the plurality of first areas, and theenvironment map may be used for performing path planning.

Optionally, the environment map may be a pass-through cost list or aglobal pass-through cost topology view.

It should be understood that in this embodiment of the presentdisclosure, the environment map may mark a representation value of anenvironment characteristic, but it does not mean that a pass-throughcost of each area in the map is related only to the representation valueof the environment characteristic. The pass-through cost of each area isfurther related to a pass-through distance of each area. For example, ifpass-through distances are inconsistent, representation values of anenvironment characteristic may be different even though pass-throughcosts are the same.

It should be understood that in this embodiment of the presentdisclosure, the intelligent execution apparatus may further not generatea map, but directly performs path planning based on pass-through costsof a plurality of first areas.

Optionally, the intelligent execution apparatus may obtain apass-through cost in a corresponding area in a statistical or votingmanner using representation values that are of an environmentcharacteristic and that are obtained at a plurality of times, or mayobtain in real time a pass-through cost in a corresponding area using areal-time representation value of an environment characteristic, or mayobtain a pass-through cost in a corresponding area using a predictedrepresentation value of an environment characteristic.

In an embodiment, the intelligent execution apparatus may obtain thepass-through cost in the corresponding area in the statistical or votingmanner using the representation values that are of the environmentcharacteristic and that obtained at a plurality of times, to generate anenvironment map, or may obtain in real time the pass-through cost in thecorresponding area using the real-time representation value of theenvironment characteristic, to update an environment map in real time,or may obtain the pass-through cost in the corresponding area using thepredicted representation value of the environment characteristic, togenerate an environment map.

The statistical manner is to process together the representation valuesthat are of the environment characteristic and that are obtained at aplurality of times, for example, perform weighted processing, to obtainthe pass-through cost in the corresponding area. The voting manner is toselect, from the representation values that are of the environmentcharacteristic and that are obtained at a plurality of times,representation values that are of an environment characteristic and thatare obtained at some of the plurality of times, to obtain thepass-through cost in the corresponding area.

In an embodiment, it may be determined with reference to an actualsituation to obtain the pass-through cost in the statistical or votingmanner, or in real time, or in a prediction manner, or through acombination of any two of the manners.

Optionally, when stability of the representation value of theenvironment characteristic is relatively good, the pass-through cost inthe corresponding area may be obtained in the statistical manner, orwhen stability of the representation value of the environmentcharacteristic is relatively poor, the pass-through cost in thecorresponding area may be obtained in real time.

For example, when the environment characteristic is a visual signal, inan outdoor environment, illumination conditions are different atdifferent time periods, and a map may be updated according to a timeperiod. In indoor environments (for example, during business periods ofshopping malls), illumination conditions are basically the same at sametime periods, and a map may be generated in a statistical manner.

The stability of the representation value of the environmentcharacteristic may be a change rate of the environment characteristic.For example, when a change rate of strength of the environmentcharacteristic is less than or equal to a predetermined value, or achange rate of a direction of the environment characteristic is lessthan or equal to a predetermined value, it is considered that stabilityis relatively good.

Optionally, when the environment characteristic is a predictableenvironment characteristic, in other words, when the representationvalue of the environment characteristic at another moment and/or inanother area can be predicted based on the representation value of theenvironment characteristic at a moment and/or in an area, it can beconsidered that the environment characteristic is a predictableenvironment characteristic.

For example, when the environment characteristic is a visual signal, anillumination condition at another time period may be predicted based onan illumination condition at a time period. When the environmentcharacteristic is a sound signal, a sound signal at another time periodmay be predicted based on a sound signal at a time period. When theenvironment signal is a road surface status, the road surface status maybe predicted based on a weather forecast status.

It should be understood that there may be another implementation for theprediction manner of the representation value of the environmentcharacteristic in this embodiment of the present disclosure, and detailsare not described herein.

Optionally, the environment map in this embodiment of the presentdisclosure may include a pass-through cost of each of a plurality ofareas, and the pass-through cost of each area may include a plurality ofpass-through costs, for example, may include predicted pass-throughcosts at various moments. Therefore, when path planning is performed, acorresponding path plan in an area may be obtained with reference to apass-through cost of the area at each moment and a current moment whenthe apparatus moves to the area, to select a better path.

Optionally, the map in this embodiment of the present disclosure mayinclude pass-through costs for a plurality of directions in each of theplurality of areas, and a pass-through cost in each direction is apass-through cost for passing through the area in the direction. Forexample, when the environment characteristic is a visual signal,different directions may have different representation values. Forexample, a representation value for a pass-through direction away fromthe sun is different from a representation value for a pass-throughdirection towards the sun.

It is assumed that an area in the map may include eight pass-throughdirections respectively at 0 degrees, 45 degrees, 90 degrees, 135degrees, 180 degrees, 225 degrees, 270 degrees, and 315 degrees, andpass-through costs may be determined based on illumination conditionscollected by cameras in the eight directions of the area.

It should be understood that another quantity of pass-through costs maybe determined, and may be specifically determined based on a divisionshape of each area, a capability of the intelligent execution device, arequirement of a to-be-executed task, and the like.

In this embodiment of the present disclosure, the pass-through cost ineach first area is obtained based on the pass-through distance of eachof the plurality of first areas and the representation value of theenvironment characteristic of each first area such that when theenvironment map is generated, a pass-through cost in each area can bemarked in each area. When the environment map is generated, not only apass-through distance of an area but also a representation value of anenvironment characteristic of the area can be considered, and thepass-through distance and the representation value of the environmentcharacteristic are quantized into a pass-through cost, to obtain abetter environment map. In this way, the environment map is more widelyapplied, better path planning can be implemented, and the pass-throughdistance and the representation value of the environment characteristicare quantized into the pass-through cost such that when performing pathplanning, a robot can obtain a pass-through path based on thepass-through cost, thereby reducing an operating time of the robot, andimproving task execution efficiency.

Optionally, in this embodiment of the present disclosure, when thepass-through cost in the first area is obtained with reference to thepass-through distance of the first area and the representation value ofthe environment characteristic, a first pass-through cost componentcorresponding to the pass-through distance and a second pass-throughcost component corresponding to the representation value of theenvironment characteristic may be calculated, and the pass-through costfor passing through the area may be obtained with reference to the firstpass-through cost component and the second pass-through cost component.

In an implementation, the first pass-through cost component and thesecond pass-through cost component of the first area may be added, toobtain the pass-through cost of the first area.

In another implementation, weighted processing may be performed on thefirst pass-through cost component of the first area and the secondpass-through cost component of the first area, to obtain thepass-through cost of the first area. A weighting coefficient may be setbased on a specific case, for example, if a to-be-executed task hasrelatively high sensitivity to a pass-through distance of an area, arelatively high weighting coefficient may be set for a size.

In another implementation, the second pass-through cost may be acoefficient that is multiplied by the first pass-through cost componentto obtain the pass-through cost, and the pass-through cost in the firstarea may be obtained with reference to the first pass-through costcomponent and the coefficient.

It should be understood that in this embodiment of the presentdisclosure, in addition to the pass-through distance of the area and therepresentation value of the environment characteristic, another factormay be further considered. For example, a third pass-through costcomponent in each area is determined based on signal quality of awireless signal (for example, a satellite signal or a network signal).Therefore, the first pass-through cost component, the secondpass-through cost component, and the third pass-through cost componentmay be added or weighted, to obtain a pass-through cost of the area.

Optionally, the obtained second pass-through cost component in each areamay be determined based on a representation value of an environmentcharacteristic of each area and a correspondence between arepresentation value interval of an environment characteristic and apass-through cost.

For example, an environment characteristic may be graded at threelevels, good, medium, and poor. Each level includes a range of valuesthat can be quantized, and each level may be corresponding to adifferent second pass-through cost component. After a representationvalue of an environment characteristic is obtained, a level of therepresentation value of the environment characteristic may bedetermined, and a second pass-through cost component corresponding tothe level may be obtained.

For example, a good representation value of an environmentcharacteristic is corresponding to a coefficient 1, a mediumrepresentation value of an environment characteristic is correspondingto a coefficient 5, and a poor representation value of an environmentcharacteristic is corresponding to a coefficient 10. Pass-through costscorresponding to distances of an area are 10 (for a side-lengthdistance) and 14 (for a diagonal distance). If a representation value ofan environment characteristic at the location is poor, pass-throughcosts of the side-length distance and the diagonal distance at thelocation may be determined as 100 and 140, or if a representation valueof an environment characteristic at the location is medium, pass-throughcosts of the side-length distance and the diagonal distance at thelocation may be determined as 50 and 70, or if a representation value ofan environment characteristic at the location is good, pass-throughcosts of the side-length distance and the diagonal distance at thelocation may be determined as 10 and 14.

It should be understood that in this embodiment of the presentdisclosure, quality of an environment characteristic represents adifficulty degree in executing a task when the environmentcharacteristic is used. Good quality represents that a task is easy toexecute, and poor quality represents that a task is difficult toexecute.

Optionally, in this embodiment of the present disclosure, a pass-throughcost may be set on the environment map for each of a plurality of typesof environment characteristics with reference to the pass-throughdistance. When a task is executed using the environment map, anenvironment characteristic usable in the task may be determined, andpath planning may be performed using a pass-through cost obtained basedon the usable environment characteristic.

Optionally, in this embodiment of the present disclosure, a pass-throughcost of each area may be obtained with reference to at least oneto-be-executed task type. In addition, optionally, a pass-through costcorresponding to the task type may be marked on the environment map, andwhen a task is executed using the environment map, a pass-through costcorresponding to the task may be determined, to perform path planning.The to-be-executed task includes but is not limited to at least one ofpositioning, communication, network connection, detection, andidentification.

Optionally, the environment characteristic includes a visual signal. Asecond pass-through cost component corresponding to each direction ineach first area is obtained based on a representation value of a visualsignal that passes through each first area in each of the plurality ofdirections, and a pass-through cost in each first area in each directionis determined based on the first pass-through cost component of eachfirst area and the second pass-through cost component corresponding tothe representation value of the visual signal that passes through eachfirst area in each direction.

Optionally, in this embodiment of the present disclosure, a pass-throughcost of each area may be obtained with reference to the at least oneto-be-executed task type on the map. When the task is executed using themap, the pass-through cost corresponding to the task may be determined,to perform path planning. The to-be-executed task on the map includesbut is not limited to at least one of positioning, communication,network connection, detection, and identification.

Optionally, a wireless pass-through cost is determined with reference toa requirement of a task type for a representation value of anenvironment characteristic and a representation value of an environmentcharacteristic. For example, if an environment characteristic a is usedin both a task type A and a task type B, and a requirement of the tasktype A for an environment characteristic is higher than a requirement ofthe task type B for an environment characteristic, with a samerepresentation value, a pass-through cost component corresponding to thetask type A is greater than a pass-through cost component correspondingto the task type B.

With reference to a manner A and a manner B, the following describes howto obtain a pass-through cost in each area with reference to ato-be-executed task type when an environment map is generated.

Manner A.

At least one to-be-executed task type is obtained, a second pass-throughcost component of each task type in each first area is obtained based ona representation value of at least one type of available environmentcharacteristic of each of the at least one task type in each first area,and a pass-through cost of each task type in each first area iscalculated based on the first pass-through cost component of each firstarea and the second pass-through cost component of each task type ineach first area.

Optionally, the environment map may be generated based on thepass-through cost of each task type in each first area, and theenvironment map includes the pass-through cost of each task type in eachfirst area.

In other words, for each task type, a pass-through cost of the task typein each area is calculated. In this way, when path planning of a tasktype is performed, a pass-through cost of each area for the task typemay be directly obtained, to implement better path planning.

When a second pass-through cost component of each task type in an areais calculated, a pass-through cost may be determined with reference to arequirement of a task type for a representation value of an environmentcharacteristic and a representation value of an environmentcharacteristic.

Optionally, the at least one task type includes a first task type, and asecond pass-through cost component of the first task type in each firstarea is determined based on a representation value of at least one typeof environment characteristic whose representation value meets apredetermined condition and that is in an available environmentcharacteristic of the first task type in each first area.

Optionally, the at least one type of environment characteristic thatmeets the predetermined condition may be an environment characteristicwhose representation value is greater than a specific threshold, or maybe an environment characteristic with an optimal representation value.

In an embodiment, if there are a plurality of types of availableenvironment characteristics for a task, an environment characteristicwith relatively good quality may be selected when the intelligentexecution apparatus moves to the area and executes the to-be-executedtask. Therefore, a pass-through cost component can be calculated usingthe environment characteristic with relatively good quality. Forexample, when a task is to perform positioning, if the positioning maybe performed in an area using a quantity of visible characteristics anda sound signal, positioning precision in the two manners may beestimated, and higher positioning precision may be determined as aparameter used for determining a pass-through cost in the area.

For the first task type, if there are a plurality of types of availableenvironment characteristics in an area, the second pass-through costcomponent may be calculated with reference to representation values ofthe plurality of types of environment characteristics, for example,weighted processing may be performed on the representation values of theplurality of types of environment characteristics, and therepresentation value obtained through the weighted processing may beused for calculating the second pass-through cost component.Alternatively, the second pass-through cost components are separatelycalculated based on the representation values of the plurality of typesof environment characteristics, and weighted processing is performed onthe obtained plurality of second pass-through cost components, to obtaina final available second pass-through cost component. Certainly, inaddition to weighted processing, another processing manner may be used,which may be specifically determined based on an actual situation. Forexample, if there are a plurality of types of environmentcharacteristics, the plurality of types of environment characteristicsmay be used together, processing similar to addition processing may beperformed on representation values of the plurality of types ofenvironment characteristics, and the second pass-through cost componentmay be further obtained through calculation.

Optionally, the first area may be any area included in the candidatearea, or may be an area that meets the following condition, therepresentation value of an available environment characteristic of thefirst task type in each first area meets an environment characteristicrequirement of the first task type.

Optionally, at least one second area is determined, and therepresentation value of the available environment characteristic of thefirst task type in the second area does not meet the environmentcharacteristic requirement of the first task type, and when pathplanning is performed, the second area may be considered as an obstacle.

Optionally, each of the at least one second area is marked as anobstacle on the environment map for the first task type.

Manner B.

A plurality of to-be-executed task types are obtained, a secondpass-through cost component of a whole of the plurality of task types ineach first area is obtained based on a representation value of at leastone type of available environment characteristic of each of theplurality of task types, and a pass-through cost of the whole of theplurality of task types in each first area is calculated based on thefirst pass-through cost component of each first area and the secondpass-through cost component of the whole of the plurality of task typesin each first area.

Optionally, the environment map may be generated based on thepass-through cost of the whole of the plurality of task types in eachfirst area, and the environment map includes the pass-through cost ofthe whole of the plurality of task types in each first area.

In other words, the plurality of task types may be considered as awhole, and the pass-through cost of the whole of the plurality of tasktypes in each area may be obtained. In this way, when path planningrequired for executing the plurality of task types is performed, apass-through cost of the whole of the plurality of task types in eacharea may be directly obtained, to implement better path planning.

Optionally, a second pass-through cost component of each task type ineach first area is obtained based on a representation value of at leastone type of available environment characteristic of each of theplurality of task types in each first area, and weighted processing isperformed on a plurality of second pass-through cost components of theplurality of task types in each first area, to obtain the secondpass-through cost component of the whole of the plurality of task typesin the first area.

In addition to weighted processing, another processing manner may beused, which may be specifically determined based on an actual situation.For example, processing similar to addition processing may be performedon representation values of the plurality of types of environmentcharacteristics, and the second pass-through cost component may befurther obtained through calculation. Alternatively, addition processingis performed on a plurality of second pass-through cost componentscorresponding to a plurality of task types, and a sum value is used as apass-through cost corresponding to the whole of the plurality of tasktypes.

It should be understood that in this embodiment of the presentdisclosure, when a second pass-through cost component of the whole ofthe plurality of task types in an area is calculated, the used at leastone type of available environment characteristic of each task type maybe all available environment characteristics of a corresponding tasktype in the area, or may be some available environment characteristicsof a corresponding task type in the area, for example, at least one typeof environment characteristic with an optimal representation value.

Optionally, the first area may be any area included in the environmentmap, or may be an area that meets the following condition. therepresentation value of the available environment characteristic of eachof the plurality of task types in each first area meets an environmentcharacteristic requirement of each task type.

Optionally, at least one third area is determined, and a representationvalue of an environment characteristic corresponding to at least one ofthe plurality of task types in the third area does not meet arepresentation value requirement of the at least one task type, and whenpath planning is performed, the third area is considered as an obstacle.

Optionally, each of the at least one third area is set as an obstacle onthe environment map for the plurality of task types.

It should be understood that when the environment map is generated, theforegoing manner A and manner B may be combined for use.

For example, tasks to be executed using the environment map include atask 1, a task 2, and a task 3, pass-through costs are respectivelycalculated for the task 1, the task 2, and the task 3, and a totalpass-through cost of the task 1, the task 2, and the task 3 iscalculated, or a pass-through cost of the task 1 is calculated, and atotal pass-through cost of the task 2 and the task 3 is calculated.

It should be understood that in this embodiment of the presentdisclosure, classification of “types” of environment characteristics mayindicate differences of environment characteristics, for example, avisual signal and a sound signal are considered as different types ofenvironment characteristics, or may indicate different sources of a sametype of environment characteristic, for example, light emitted from thesun and light emitted from a lamp in visual signals. A distinguishingdimension of “type” may be determined based on a specific actualsituation.

Similarly, classification of “types” of tasks may also be determinedbased on a specific situation, for example, agricultural use andindustrial use are different task types, and for example, positioningand communication are different task types.

220. Obtain a start location and a target location.

230. Perform path planning based on the pass-through cost for passingthrough each first area, to determine a pass-through path from the startlocation to the target location, where the pass-through path includes anarea passed through from the start location to the target location.

Optionally, in this embodiment of the present disclosure, the path fromthe start location to the target location may be determined using theenvironment map.

When path planning is performed using the environment map, a pluralityof algorithms may be used, for example, a Dijksra algorithm, an A*algorithm, and the like.

For ease of understanding, the following describes how to implement pathplanning with reference to the A* searching algorithm.

In the A* algorithm, the following formula 1 is required:

F(n)=G(n)+H(n)  formula 1

F(n) is an estimated pass-through cost for passing through an startnode, an intermediate node n, and then a target node, G(n) is anactually obtained pass-through cost for passing through the start nodeto the intermediate node n, and H(n) is an estimated pass-through costof an optimal path from the intermediate node n to the target node.

H(n) may be calculated using a Manhattan algorithm or another algorithm,and is not specifically limited herein.

A key to find out the optimal path lies in selection of an evaluationfunction F(n). For clear understanding of the algorithm, the followingspecifically describes an execution manner of the algorithm.

Step 1: Add the start node to an enabled list.

Step 2: Repeat the following operations.

a. Find a node with a lowest value of F in the enabled list, namely, acurrent node.

b. Switch the current node to a disabled list.

c. Perform the following operations on each adjacent node of the currentnode.

(1) If the adjacent node cannot be passed through or is in the disabledlist, ignore the node.

(2) If the adjacent node is not in the enabled list, add the adjacentnode to the enabled list, use the current node as a traceback node ofthe node, and record values of F, G, and H of the node.

(3) If the adjacent node is already in the enabled list, use a value ofG as a reference to check whether a new path is better, and if the newpath is better, use a traceback node of the adjacent node as the currentnode, and re-calculate values of G and F of the node.

d. Stop the process in the following two cases.

(1) The target node is added to the disabled list, and in this case, thepath has been found.

(2) No target path is found. In this case, the enabled list is empty,indicating that no path is found.

Step 3: Save a path. A path from the target node to the start node alonga traceback node of each node is a selected path.

For clearer understanding of an implementation of the A* algorithm, thefollowing is described with reference to FIG. 3 to FIG. 6.

FIG. 3 shows a location relationship between a start node, an obstacle,and a target node.

As shown in FIG. 4, FIG. 5, and FIG. 6, a path is calculated based ononly a pass-through cost corresponding to a pass-through distance of anode. It is assumed that side-length distances of nodes are consistent,diagonal distances of the nodes are consistent, a pass-through costcorresponding to a side-length distance of each node may be denoted as10, and a pass-through cost corresponding to a diagonal distance of eachnode may be denoted as 14.

As shown in FIG. 7, a path is calculated based on a pass-through costcorresponding to a pass-through distance of a node and a representationvalue of an environment characteristic.

As shown in FIG. 4 to FIG. 7, a value of G is shown in a lower leftpart, a value of H is shown in a lower right part, a value of F is shownin an upper left part, and

indicates a traceback node of a current node.

As shown in FIG. 3, a node A is a start node, a node B is a target node,and three nodes O between the node A and the node B are obstacles,namely, nodes that cannot be passed through.

As shown in FIG. 4, after the start node is switched to the disabledlist, the enabled list is searched for a node with a lowest value of F,namely, a node C immediately adjacent to a right side of the start nodeA. The node C is added to the disabled list, and then a node adjacent tothe node C is checked. Because a left node of the node C is the startnode, and a right node of the node C is an obstacle, the two nodes canbe ignored. Another two adjacent nodes of the node C are added to theenabled list, and then a value of G is used as a reference to check inthe enabled list whether a new path is better. It is found that nodesabove and beneath the node C are directly connected to the start node,and a path is better. Because values of F of the nodes above and beneaththe node C are consistent, a node last added to the list may beselected, or a node may be randomly selected. For example, as shown inFIG. 5, a node D is selected. Selection continues until an optimal pathis found. A finally obtained path may be shown in FIG. 6, and nodes thatneed to be passed through from the start node A to an end node B (thetarget node B) include a node D, a node E, a node F, a node G, and anode H.

FIG. 7 shows an optimal path that is from the start node A to the endnode B and that is obtained with reference to a representation value ofan environment characteristic and a pass-through distance of an area. Inan environment map shown in FIG. 7, pass-through costs of three nodes ona left side of an obstacle are changed to 100 and 140 (for example, thepass-through costs are changed due to a relatively poor lightcondition). It can be seen from the figure that traceback nodes of theupper and lower two nodes of the three nodes have changed. Based on theA* algorithm and an updated cost, nodes that need to be passed throughin an optimal path from the node A to the node B include a node I, anode E, a node F, a node G, and a node H.

Therefore, it can be seen from FIG. 3 to FIG. 7 that a path finallyplanned using an environment map obtained based on a representationvalue of an environment characteristic and a pass-through distance isdifferent from a path finally planned using an environment map obtainedbased on only a pass-through distance. Therefore, when path planning isperformed using the environment map generated based on therepresentation value of the environment characteristic and thepass-through distance, more factors may be considered such that aplanned path is better.

FIG. 8 is a schematic flowchart of a map generation method 300 accordingto an embodiment of the present disclosure. As shown in FIG. 8, themethod 300 includes the following content.

310. Obtain, based on a pass-through distance of each of a plurality offirst areas and a representation value of an environment characteristicof each first area, a pass-through cost for passing through each firstarea.

320. Generate an environment map based on the pass-through cost forpassing through each first area, where the environment map includes thepass-through cost for passing through each first area, and is used tomark the representation value of each first area within a coverage areaof the plurality of first areas.

Optionally, for a specific implementation of the map generation methodshown in FIG. 8, refer to the description in the method 200. Forbrevity, details are not described herein again.

FIG. 9 is a schematic flowchart of a path planning method 400 accordingto an embodiment of the present disclosure. As shown in FIG. 9, themethod 400 includes the following content.

410. Obtain an environment map, where the environment map includes apass-through cost for passing through each of a plurality of firstareas, and is used to mark a representation value of each first areawithin a coverage area of the plurality of first areas, and thepass-through cost of each first area is determined based on apass-through distance of each first area and a representation value ofan environment characteristic of each first area.

420. Perform path planning using the environment map.

In an implementation, when a representation value of an environmentcharacteristic at the current location does not meet a pass-throughrequirement, a location to which a robot is to move is selected from theplurality of locations based on the map.

Therefore, a robot does not actively move to an area whoserepresentation value of an environment characteristic does not meet apass-through requirement such that stability of environmentcharacteristic input is improved, and robustness of a correspondingfunction of the robot is improved. Further, when the robot finds thatthe representation value of the environment characteristic does not meetthe pass-through requirement, the robot can actively move to, based onthe map, an area whose representation value of the environmentcharacteristic meets the pass-through requirement such that robot usestability is improved, and user experience is improved.

In another implementation, a start location and a target location areobtained, and a path from the start location to the target location isdetermined using the map.

Optionally, for a specific implementation of the path planning methodshown in FIG. 9, refer to the description in the method 200. Forbrevity, details are not described herein again.

FIG. 10 is a schematic block diagram of a path planning apparatus 500according to an embodiment of the present disclosure. As shown in FIG.10, the path planning apparatus 500 includes a first obtaining unit 510,configured to obtain, based on a pass-through distance of each of aplurality of first areas and a representation value of an environmentcharacteristic of each first area, a pass-through cost for passingthrough each first area, a second obtaining unit 520, configured toobtain a start location and a target location, and a path planning unit530, configured to perform path planning based on the pass-through costfor passing through each first area, to determine a pass-through pathfrom the start location to the target location, where the pass-throughpath includes an area passed through from the start location to thetarget location.

Optionally, the apparatus 500 further includes a map generation unit540, configured to generate an environment map based on the pass-throughcost for passing through each first area, where the environment mapincludes the pass-through cost for passing through each first area, andis used to mark the representation value of each first area within acoverage area of the plurality of first areas, and the path planningunit 530 is further configured to, based on the environment map,determine the pass-through path based on a pass-through cost for passingthrough each area within a coverage area of the plurality of areas.

Optionally, the first obtaining unit 510 is further configured todetermine, based on the pass-through distance of each first area, afirst pass-through cost component corresponding to the pass-throughdistance of each first area, determine, based on the representationvalue of the environment characteristic of each first area, a secondpass-through cost component corresponding to the representation value ofthe environment characteristic of each first area, and calculate, basedon the first pass-through cost component and the second pass-throughcost component of each first area, the pass-through cost for passingthrough each first area.

Optionally, the first obtaining unit 510 is further configured to obtainat least one task type to be executed when the pass-through path ispassed through, obtain, based on a representation value of at least onetype of available environment characteristic of each of the at least onetask type in each first area, a second pass-through cost componentcorresponding to each task type at each first area, and calculate, basedon the first pass-through cost component of each first area and thesecond pass-through cost component corresponding to each task type ineach first area, a pass-through cost for passing through each first areawhen each task type is executed, and the path planning unit 530 isfurther configured to determine, based on the pass-through cost forpassing through each first area when each task type is executed, thepass-through path used for executing each task type.

Optionally, the at least one task type includes a first task type, andthe first obtaining unit 510 is further configured to determine, basedon a representation value of at least one type of environmentcharacteristic whose representation value meets a predeterminedcondition and that is in an available environment characteristic of thefirst task type in each first area, a second pass-through cost componentcorresponding to the first task type in each first area.

Optionally, the first area is an area that meets the followingcondition, the representation value of an available environmentcharacteristic of the first task type in the first area meets anenvironment characteristic requirement of the first task type.

Optionally, the first obtaining unit 510 is further configured todetermine at least one second area, where the representation value ofthe available environment characteristic of the first task type in thesecond area does not meet the environment characteristic requirement ofthe first task type, and the path planning unit 530 is furtherconfigured to, when performing path planning, consider each of the atleast one second area as an obstacle.

Optionally, the first obtaining unit 510 is further configured to obtaina plurality of task types to be executed when the pass-through path ispassed through, obtain, based on a representation value of at least onetype of available environment characteristic of each of the plurality oftask types, a second pass-through cost component corresponding to awhole of the plurality of task types in each first area, and calculate,based on the first pass-through cost component of each first area andthe second pass-through cost component corresponding to the whole of theplurality of task types in each first area, a pass-through costcorresponding to the whole of the plurality of task types in each firstarea, and the path planning unit 530 is further configured to determine,based on the pass-through cost corresponding to the whole of theplurality of task types in each first area, the pass-through path usedfor executing the plurality of task types.

Optionally, the first obtaining unit 510 is further configured toobtain, based on a representation value of at least one type ofavailable environment characteristic of each of the plurality of tasktypes in each first area, a second pass-through cost componentcorresponding to each task type in each first area, and perform weightedprocessing on a plurality of second pass-through cost componentscorresponding to the plurality of task types in each first area, toobtain the second pass-through cost component corresponding to the wholeof the plurality of task types in the first area.

Optionally, the first area is an area that meets the following conditionthe representation value of the available environment characteristic ofeach of the plurality of task types in the first area meets anenvironment characteristic requirement of each task type.

Optionally, the first obtaining unit 510 is further configured todetermine at least one third area, where a representation value of anenvironment characteristic corresponding to at least one of theplurality of task types in the third area does not meet a representationvalue requirement of the at least one task type, and the path planningunit 530 is further configured to when performing path planning,consider each of the at least one third area as an obstacle.

Optionally, the first obtaining unit 510 is further configured todetermine, based on a representation value of an environmentcharacteristic of each area and a correspondence between arepresentation value interval of an environment characteristic and apass-through cost component, the obtained second pass-through costcomponent in each first area.

Optionally, the first obtaining unit 510 is further configured toobtain, in a statistical manner based on the pass-through distance ofeach first area and representation values that are of an environmentcharacteristic of each first area and that are obtained at a pluralityof times, the pass-through cost for passing through each first area, orobtain, in real time based on the pass-through distance of each firstarea and a real-time representation value of an environmentcharacteristic of each first area, the pass-through cost for passingthrough each first area, or obtain, based on the pass-through distanceof each first area and a predicted representation value of anenvironment characteristic of each first area, the pass-through cost forpassing through each first area.

Optionally, the first obtaining unit 510 is further configured to, whena change rate of a representation value of an environment characteristicof each first area is less than or equal to a first threshold, obtain,in a statistical manner based on the pass-through distance of each firstarea and the representation values that are of the environmentcharacteristic of each first area and that are obtained at a pluralityof times, the pass-through cost for passing through each first area.

Optionally, the first obtaining unit 510 is further configured to, whena change rate of a representation value of an environment characteristicof each first area is greater than a second threshold, obtain, in realtime based on the pass-through distance of each first area and thereal-time representation value of the environment characteristic of eachfirst area, the pass-through cost for passing through each first area.

Optionally, the environment characteristic includes a visual signal, andthe first obtaining unit 510 is further configured to obtain, based on arepresentation value of a visual signal that passes through each firstarea and that is in each of the plurality of directions, a secondpass-through cost component corresponding to each direction at eachfirst area, and determine, based on the first pass-through costcomponent of each first area and the second pass-through cost componentcorresponding to each direction in each first area, a pass-through costfor passing through each first area in each direction.

Optionally, the environment characteristic includes at least one of avisual signal, a sound signal, and a contact surface status.

Optionally, the environment characteristic includes a visual signal, anda representation value of the visual signal includes light intensityand/or a quantity of visible characteristics.

Optionally, the environment characteristic includes a sound signal, anda representation value of the sound signal includes strength of thesound signal.

Optionally, the environment characteristic includes a contact surfacestatus, and a representation value of the contact surface statusincludes an inclination degree, a height change rate, and/or a frictiondegree of a contact surface of the location.

It should be understood that the path planning apparatus 500 may performthe method shown in FIG. 2. For brevity, details are not describedherein again.

FIG. 11 is a schematic block diagram of a map generation device 600according to an embodiment of the present disclosure. As shown in FIG.11, the device 600 includes an obtaining unit 610 and a map generationunit 620. The obtaining unit 610 is configured to obtain, based on apass-through distance of each of a plurality of first areas and arepresentation value of an environment characteristic of each firstarea, a pass-through cost for passing through each first area, and themap generation unit 620 is configured to generate an environment mapbased on the pass-through cost for passing through each first area,where the environment map includes the pass-through cost for passingthrough each first area, and is used to mark the representation value ofeach first area within a coverage area of the plurality of first areas.

It should be understood that, for a manner of obtaining the pass-throughcost by the obtaining unit 610 and a manner of generating the map by themap generation unit 620, refer to the description of the foregoingmethod. For brevity, details are not described herein again.

FIG. 12 is a schematic block diagram of a path planning apparatus 700according to an embodiment of the present disclosure. As shown in FIG.12, the apparatus 700 includes an obtaining unit 710 and a path planningunit 720. The obtaining unit 710 is configured to obtain an environmentmap, where the environment map includes a pass-through cost for passingthrough each first area, and is used to mark a representation value ofeach first area within a coverage area of the plurality of first areas,and the pass-through cost of each first area is determined based on apass-through distance of each of the plurality of first areas and arepresentation value of an environment characteristic of each firstarea. The path planning unit 720 is configured to perform path planningusing the environment map.

It should be understood that, for a manner of obtaining the environmentmap by the obtaining unit 710 and a manner of performing path planningby the path planning unit 720, refer to the description of the foregoingmethod. For brevity, details are not described herein again.

FIG. 13 is a schematic block diagram of an intelligent executionapparatus 800 according to an embodiment of the present disclosure. Theintelligent execution apparatus 800 may be a machining apparatus thatautomatically executes work, for example, may be a robot, a self-drivingvehicle, or an unmanned aerial vehicle.

As shown in FIG. 13, the intelligent execution apparatus 800 may includea control system 810, a drive mechanism 820, a sensor 830, an executionmechanism 840, and an external output apparatus 850.

The control system 810 may send an instruction to the drive mechanism820, and the drive mechanism 820 may drive the execution mechanism 840to perform a corresponding action based on the instruction sent by thecontrol system 810.

The control system 810 may externally output a signal using the externaloutput apparatus 850. Optionally, the external output apparatus 850 mayinclude a display, a voice output apparatus, a wireless transmitter, orthe like, where the display may display quantity of electricity, aplanned path, or the like, the voice output apparatus may coordinatewith a voice detection sensor, to implement a dialog with a user or thelike, and the wireless transmitter may send a wireless signal or thelike.

The sensor 830 may include an internal information sensor and anexternal information sensor. The internal information sensor may detecta working status of each part of the intelligent execution apparatus,for example, a location, a speed, acceleration, and the like of eachjoint included in the execution mechanism 840. The external informationsensor may detect external information, for example, may obtain therepresentation value of the environment characteristic described in theembodiments of this application or the like, and may further obtainother information, for example, obtain a voice instruction that is inputby the user, and receive a wireless signal.

The sensor 830 may provide the obtained information for the controlsystem 810, and the control system 810 may send, based on theinformation provided by the sensor, an instruction to the drivemechanism 820, and/or externally output a signal using the externaloutput apparatus 850.

Optionally, the drive mechanism 820 may be a power driving apparatus,such as a stepper motor or a servo motor.

Optionally, the execution mechanism 840 is configured to perform acorresponding action based on a drive of the drive mechanism 820. Theexecution mechanism 840 may use a space open-chain linkage mechanism,where a revolute pair may be referred to as a joint, and a freedomdegree of the intelligent execution apparatus may be determined by aquantity of joints. For example, the intelligent execution mechanism 800is a robot, the execution mechanism may include a hand, a wrist, an arm,a walking part, and the like, and parts may be optionally connected toeach other using a joint.

Optionally, the control system 810 may include a processor 814 and amemory 812. The memory 812 may store program code, and the processor 814may execute the program code stored in the memory 812. The processor 814communicates with the memory 812 using an internal connection path.

Optionally, the processor 814 may invoke the program code stored in thememory 812, to perform the method shown in FIG. 2, FIG. 8, or FIG. 9. Inaddition, optionally, the processor 814 may invoke the program codestored in the memory 812, to send an instruction to the drive mechanism820. In addition, optionally, the processor 814 may invoke the programcode stored in the memory 812, to externally output a signal using theexternal output apparatus 850.

It should be understood that the intelligent execution apparatus 800shown in FIG. 13 is only an optional embodiment of this application. Theintelligent execution apparatus in this embodiment of this applicationmay further include another mechanism, for example, the intelligentexecution apparatus 800 may not include the external output apparatus,or a wireless transceiver included in the external output apparatus anda receiver in the sensor may be integrated. It should be understood thatthe processor in this embodiment of the present disclosure may be anintegrated circuit chip, and has a signal processing capability. Theprocessor may be a general purpose processor, Digital Signal Processor(DSP), an Application-Specific Integrated Circuit (ASIC), a FieldProgrammable Gate Array (FPGA) or another programmable logical device, adiscrete gate or transistor logic device, or a discrete hardwarecomponent. It may implement or perform the methods, the steps, andlogical block diagrams that are disclosed in the embodiments of thepresent disclosure. The general purpose processor may be amicroprocessor, or the processor may be any conventional processor orthe like.

The memory in the embodiments of the present disclosure may be avolatile memory or a nonvolatile memory, or may include both a volatilememory and a nonvolatile memory. The nonvolatile memory may be aRead-Only Memory (ROM), a Programmable ROM (PROM), an erasableprogrammable read-only memory (EPROM), an electrically erasableprogrammable read-only memory (EEPROM), or a flash memory. The volatilememory may be a Random Access Memory (RAM), used as an external cache.Through example but not limitative description, many forms of RAMs maybe used, for example, a static random access memory (SRAM), a dynamicrandom access memory (DRAM), a synchronous dynamic random access memory(SDRAM), a double data rate synchronous dynamic random access memory(DDR SDRAM), an enhanced synchronous dynamic random access memory(ESDRAM), a synchronous link dynamic random access memory (SLDRAM), anda direct Rambus dynamic random access memory (DR RAM). It should benoted that the memory of the systems and methods described in thisspecification includes but is not limited to these and any memory ofanother proper type.

A person of ordinary skill in the art may be aware that, in combinationwith the examples described in the embodiments disclosed in thisspecification, units and algorithm steps may be implemented byelectronic hardware or a combination of computer software and electronichardware. Whether the functions are performed by hardware or softwaredepends on particular applications and design constraint conditions ofthe technical solutions. A person skilled in the art may use differentmethods to implement the described functions for each particularapplication, but it should not be considered that the implementationgoes beyond the scope of the present disclosure.

It may be clearly understood by a person skilled in the art that, forthe purpose of convenient and brief description, for a detailed workingprocess of the foregoing system, apparatus, and unit, reference may bemade to a corresponding process in the foregoing method embodiments, anddetails are not described herein again.

In the several embodiments provided in the present disclosure, it shouldbe understood that the disclosed system, apparatus, and method may beimplemented in other manners. For example, the described apparatusembodiment is merely an example. For example, the unit division ismerely logical function division and may be other division in actualimplementation. For example, a plurality of units or components may becombined or integrated into another system, or some features may beignored or not performed. In addition, the displayed or discussed mutualcouplings or direct couplings or communication connections may beimplemented using some interfaces. The indirect couplings orcommunication connections between the apparatuses or units may beimplemented in electronic, mechanical, or other forms.

The units described as separate parts may or may not be physicallyseparate, and parts displayed as units may or may not be physical units,may be located in one location, or may be distributed on a plurality ofnetwork units. Some or all of the units may be selected according toactual requirements to achieve the objectives of the solutions of theembodiments.

In addition, functional units in the embodiments of the presentdisclosure may be integrated into one processing unit, or each of theunits may exist alone physically, or two or more units are integratedinto one unit.

When the functions are implemented in the form of a software functionalunit and sold or used as an independent product, the functions may bestored in a computer-readable storage medium. Based on such anunderstanding, the technical solutions may be implemented in a form of asoftware product. The computer software product is stored in a storagemedium, and includes several instructions for instructing a computerdevice (which may be a personal computer, a server, or a network device)to perform all or some of the steps of the methods described in theembodiments of the present disclosure. The foregoing storage mediumincludes, any medium that can store program code, such as a USB flashdrive, a removable hard disk, a read-only memory (ROM), a random accessmemory (RAM), a magnetic disk, or an optical disc.

The foregoing descriptions are merely specific implementations of thepresent disclosure, but are not intended to limit the protection scopeof the present disclosure. Any variation or replacement readily figuredout by a person skilled in the art within the technical scope disclosedin the present disclosure shall fall within the protection scope of thepresent disclosure. Therefore, the protection scope of the presentdisclosure shall be subject to the protection scope of the claims.

1. A path planning method, comprising: obtaining, based on apass-through distance of each first area of a plurality of first areasand a representation value of an environment characteristic of eachfirst area, a pass-through cost for passing through each first area;obtaining a start location and a target location; and performing pathplanning based on the pass-through cost for passing through each firstarea to determine a pass-through path from the start location to thetarget location, wherein the pass-through path comprises a first areapassed through from the start location to the target location.
 2. Thepath planning method according to claim 1, further comprising generatingan environment map based on the pass-through cost for passing througheach first area, wherein the environment map comprises the pass-throughcost for passing through each first area and marks the representationvalue of each first area, wherein performing path planning based on thepass-through cost for passing through each first area to determine thepass-through path from the start location to the target locationcomprises determining the pass-through path based on the pass-throughcost for passing through each first area and the environment map.
 3. Thepath planning method according to claim 1, wherein obtaining, based onthe pass-through distance of each first area and the representationvalue of the environment characteristic of each first area, thepass-through cost for passing through each first area comprises:determining, based on the pass-through distance of each first area, afirst pass-through cost component corresponding to the pass-throughdistance of each first area; determining, based on the representationvalue of the environment characteristic of each first area, a secondpass-through cost component corresponding to the representation value ofthe environment characteristic of each first area; and calculating,based on the first pass-through cost component and the secondpass-through cost component corresponding to the representation value ofthe environment characteristic of each first area, the pass-through costfor passing through each first area.
 4. The path planning methodaccording to claim 3, further comprising obtaining at least one tasktype to be executed in response to the pass-through path being passedthrough, wherein determining, based on the representation value of theenvironment characteristic of each first area, the second pass-throughcost component corresponding to the representation value of theenvironment characteristic of each first area comprises obtaining, basedon a representation value of at least one type of available environmentcharacteristic related to each of the at least one task type at eachfirst area, a second pass-through cost component corresponding to eachtask type at each first area, wherein calculating, based on the firstpass-through cost component and the second pass-through cost componentcorresponding to each task type at each first area, the pass-throughcost for passing through each first area comprises calculating, based onthe first pass-through cost component of each first area and the secondpass-through cost component corresponding to each task type at eachfirst area, a pass-through cost for passing through each first area inresponse to each task type being executed, and wherein performing thepath planning based on the pass-through cost for passing through eachfirst area comprises determining, based on the pass-through cost forpassing through each first area in response to each task type beingexecuted, the pass-through path used for executing each task type. 5.The path planning method according to claim 4, wherein the at least onetask type comprises a first task type, and wherein obtaining the secondpass-through cost component corresponding to each task type in eachfirst area comprises determining, based on a representation value of atype of environment characteristic with a representation value meeting apredetermined condition and that is associated with an availableenvironment characteristic of the first task type in each first area, asecond pass-through cost component corresponding to the first task typein each first area.
 6. The path planning method according to claim 3,further comprising obtaining a plurality of task types to be executed inresponse to the pass-through path being passed through, whereinobtaining, based on the representation value of the environmentcharacteristic of each first area, the second pass-through costcomponent corresponding to the representation value of the environmentcharacteristic of each first area comprises obtaining, based on arepresentation value of at least one type of available environmentcharacteristic of each of the plurality of task types, a secondpass-through cost component corresponding to all of the plurality oftask types in each first area, wherein calculating, based on the firstpass-through cost component and the second pass-through cost componentof each first area, the pass-through cost for passing through each firstarea comprises calculating, based on the first pass-through costcomponent of each first area and the second pass-through cost componentcorresponding to all of the plurality of task types in each first area,a pass-through cost corresponding to all of the plurality of task typesin each first area, and wherein performing the path planning based onthe pass-through cost for passing through each first area comprisesdetermining, based on the pass-through cost corresponding to all of theplurality of task types in each first area, the pass-through path usedfor executing the plurality of task types.
 7. The path planning methodaccording to claim 6, wherein obtaining the second pass-through costcomponent corresponding to all of the plurality of task types in eachfirst area comprises: obtaining, based on a representation value of atleast one type of available environment characteristic of each of theplurality of task types in each first area, a second pass-through costcomponent corresponding to each task type in each first area; andperforming weighted processing on a plurality of second pass-throughcost components corresponding to the plurality of task types in eachfirst area to obtain the second pass-through cost componentcorresponding to all of the plurality of task types in the first area.8. The path planning method according to claim 3, wherein theenvironment characteristic comprises a visual signal, whereindetermining, based on the representation value of the environmentcharacteristic of each first area, the second pass-through costcomponent corresponding to the representation value of the environmentcharacteristic of each first area comprises obtaining, based on arepresentation value of a visual signal that passes through each firstarea and that is in each of a plurality of directions, a secondpass-through cost component corresponding to each direction at eachfirst area, and wherein calculating, based on the first pass-throughcost component and the second pass-through cost component of each firstarea, the pass-through cost for passing through each first areacomprises determining, based on the first pass-through cost componentcorresponding to the pass-through distance of each first area and thesecond pass-through cost component corresponding to each direction ineach first area, a pass-through cost for passing through each first areain each direction.
 9. The path planning method according to claim 1,wherein obtaining, based on the pass-through distance of each first areaand the representation value of the environment characteristic of eachfirst area, the pass-through cost for passing through each first areacomprises obtaining, in a statistical manner based on the pass-throughdistance of each first area and representation values that are of theenvironment characteristic of each first area and obtained at aplurality of times, the pass-through cost for passing through each firstarea.
 10. A path planning apparatus, comprising: a memory configured tostore instructions; and a processor coupled to the memory and configuredto execute the instructions, which cause the processor to be configuredto: obtain, based on a pass-through distance of each first area of aplurality of first areas and a representation value of an environmentcharacteristic of each first area, a pass-through cost for passingthrough each first area; obtain a start location and a target location;and perform path planning based on the pass-through cost for passingthrough each first area to determine a pass-through path from the startlocation to the target location, wherein the pass-through path comprisesa first area passed through from the start location to the targetlocation.
 11. The path planning apparatus according to claim 10, whereinthe instructions further cause the processor to be configured to:generate an environment map based on the pass-through cost for passingthrough each first area, wherein the environment map comprises thepass-through cost for passing through each first area and marks therepresentation value of each first area; and determine the pass-throughpath based on the pass-through cost for passing through each first areaand the environment map.
 12. The path planning apparatus according toclaim 10, wherein the instructions further cause the processor to beconfigured to: determine, based on the pass-through distance of eachfirst area, a first pass-through cost component corresponding to thepass-through distance of each first area; determine, based on therepresentation value of the environment characteristic of each firstarea, a second pass-through cost component corresponding to therepresentation value of the environment characteristic of each firstarea; and calculate, based on the first pass-through cost component andthe second pass-through cost component corresponding to therepresentation value of the environment characteristic of each firstarea, the pass-through cost for passing through each first area.
 13. Thepath planning apparatus according to claim 12, wherein the instructionsfurther cause the processor to be configured to: obtain at least onetask type to be executed in response to the pass-through path beingpassed through; obtain, based on a representation value of at least onetype of available environment characteristic of each of the at least onetask type at each first area, a second pass-through cost componentcorresponding to each task type at each first area; calculate, based onthe first pass-through cost component corresponding to the pass-throughdistance of each first area and the second pass-through cost componentcorresponding to each task type in each first area, a pass-through costfor passing through each first area in response to each task type beingexecuted; and determine, based on the pass-through cost for passingthrough each first area in response to each task type being executed,the pass-through path used for executing each task type.
 14. The pathplanning apparatus according to claim 13, wherein the at least one tasktype comprises a first task type, and wherein the instructions furthercause the processor to be configured to determine, based on arepresentation value of a type of environment characteristic with arepresentation value meeting a predetermined condition and that is in anavailable environment characteristic of the first task type in eachfirst area, a second pass-through cost component corresponding to thefirst task type in each first area.
 15. The path planning apparatusaccording to claim 12, wherein the instructions further cause theprocessor to be configured to: obtain a plurality of task types to beexecuted in response to the pass-through path being passed through;obtain, based on a representation value of at least one type ofavailable environment characteristic of each of the plurality of tasktypes, a second pass-through cost component corresponding to all of theplurality of task types in each first area; calculate, based on thefirst pass-through cost component corresponding to the pass-throughdistance of each first area and the second pass-through cost componentcorresponding to all of the plurality of task types in each first area,a pass-through cost corresponding to all of the plurality of task typesin each first area; and determine, based on the pass-through costcorresponding to all of the plurality of task types in each first area,the pass-through path used for executing the plurality of task types.16. The path planning apparatus according to claim 15, wherein theinstructions further cause the processor to be configured to: obtain,based on a representation value of at least one type of availableenvironment characteristic of each of the plurality of task types ineach first area, a second pass-through cost component corresponding toeach task type in each first area; and perform weighted processing on aplurality of second pass-through cost components corresponding to theplurality of task types in each first area, to obtain the secondpass-through cost component corresponding to all of the plurality oftask types in the first area.
 17. The path planning apparatus accordingto claim 12, wherein the environment characteristic comprises a visualsignal, and wherein the instructions further cause the processor to beconfigured to: obtain, based on a representation value of a visualsignal that passes through each first area and that is in each of aplurality of directions, a second pass-through cost componentcorresponding to each direction at each first area; and determine, basedon the first pass-through cost component corresponding to thepass-through distance of each first area and the second pass-throughcost component corresponding to each direction in each first area, apass-through cost for passing through each first area in each direction.18. The path planning apparatus according to claim 10, wherein theinstructions further cause the processor to be configured to: obtain, ina statistical manner based on the pass-through distance of each firstarea and representation values that are of an environment characteristicof each first area and obtained at a plurality of times, thepass-through cost for passing through each first area; or obtain, inreal time based on the pass-through distance of each first area and areal-time representation value of an environment characteristic of eachfirst area, the pass-through cost for passing through each first area;or obtain, based on the pass-through distance of each first area and apredicted representation value of an environment characteristic of eachfirst area, the pass-through cost for passing through each first area.19. The path planning method according to claim 1, wherein thepass-through distance of each first area and the representation value ofthe environment characteristic of each first area are real time values.20. The path planning method according to claim 1, wherein therepresentation value of the environment characteristic of each firstarea is a predicted representation value of the environmentcharacteristic of each first area.